﻿using System;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x0200028E RID: 654
	public class TColumnReference : TParseTreeNode
	{
		// Token: 0x170003F5 RID: 1013
		// (get) Token: 0x0600153E RID: 5438 RVA: 0x00325DCD File Offset: 0x00323FCD
		public virtual TSourceToken ObjectToken
		{
			get
			{
				if (this._objectname == null)
				{
					return null;
				}
				return this._objectname.ObjectToken;
			}
		}

		// Token: 0x0600153F RID: 5439 RVA: 0x00325DE4 File Offset: 0x00323FE4
		public TColumnReference()
		{
		}

		// Token: 0x06001540 RID: 5440 RVA: 0x00325DEC File Offset: 0x00323FEC
		public TColumnReference(TObjectName obj)
		{
			this._objectname = obj;
		}

		// Token: 0x06001541 RID: 5441 RVA: 0x00325DFB File Offset: 0x00323FFB
		public override void init(object arg1)
		{
			if (arg1 is TObjectName)
			{
				this._objectname = (TObjectName)arg1;
				return;
			}
			if (arg1 is TSourceToken)
			{
				this._sourcetoken = (TSourceToken)arg1;
			}
		}

		// Token: 0x170003F6 RID: 1014
		// (get) Token: 0x06001542 RID: 5442 RVA: 0x00325E26 File Offset: 0x00324026
		public virtual string ColumnNameOnly
		{
			get
			{
				if (this._objectname != null)
				{
					return this._objectname.PartToken.ToString();
				}
				if (this._sourcetoken != null)
				{
					return this._sourcetoken.ToString();
				}
				return null;
			}
		}

		// Token: 0x170003F7 RID: 1015
		// (get) Token: 0x06001543 RID: 5443 RVA: 0x00325E56 File Offset: 0x00324056
		public virtual long Columns
		{
			get
			{
				if (this._objectname != null)
				{
					return this._objectname.ColumnNo;
				}
				if (this._sourcetoken != null)
				{
					return this._sourcetoken.columnNo;
				}
				return -1L;
			}
		}

		// Token: 0x170003F8 RID: 1016
		// (get) Token: 0x06001544 RID: 5444 RVA: 0x00325E82 File Offset: 0x00324082
		public virtual long Lines
		{
			get
			{
				if (this._objectname != null)
				{
					return this._objectname.LineNo;
				}
				if (this._sourcetoken != null)
				{
					return this._sourcetoken.lineNo;
				}
				return -1L;
			}
		}

		// Token: 0x170003F9 RID: 1017
		// (set) Token: 0x06001545 RID: 5445 RVA: 0x00325EAE File Offset: 0x003240AE
		public virtual TObjectName Objectname
		{
			set
			{
				this._objectname = value;
			}
		}

		// Token: 0x170003FA RID: 1018
		// (set) Token: 0x06001546 RID: 5446 RVA: 0x00325EB7 File Offset: 0x003240B7
		public virtual int Location
		{
			set
			{
				this._location = value;
			}
		}

		// Token: 0x04001726 RID: 5926
		private TObjectName _objectname;

		// Token: 0x04001727 RID: 5927
		private TSourceToken _sourcetoken;

		// Token: 0x04001728 RID: 5928
		private int _location;
	}
}
